Task: Investigate Test Patterns (DT)
Relationships
Main Description

As with designing functional code, many issues in the designing and coding of the tests will have been solved earlier by other people in other projects. It is therefore important to avoid reinventing the wheel every time! Since the introduction of object orientation, developers have been using design patterns to solve design issues within their projects. Patterns provide a formal approach to the describing of a development problem, with the proposed solution and the associated factors that may have an impact on the problem or the solution. With the rise of automated development tests, test patterns have made their entrance, particularly in respect of iterative and agile methods.

The test world now has a number of usable test patterns. During this optional activity, the development testers examine which test patterns may be applicable to the tests to be built in. While they were created with automated testing, test patterns are also very applicable to the design of test cases for manual tests.

Test patterns are described in the literature by the following information: name, purpose, context, fault model (environment factors; conditions for detection), proposed solution, entry criteria, exit criteria, consequences, known usage and related patterns.

Examples of available test patterns are:

  • pass/fail pattern,
  • collection management pattern,
  • data-driven pattern,
  • performance pattern,
  • process pattern,
  • simulation pattern,
  • multi-threading pattern,
  • stress test pattern.

For more information, refer to [Clifton, 2004].